package com.yj_app.qualitytest.activity.sccjcx.model;

import com.yj_app.qualitytest.activity.sccjcx.contract.SccjCxContract;
import com.yj_app.qualitytest.base.mvp.BaseModelImpl;
import com.yj_app.qualitytest.callback.DialogCallback;
import com.yj_app.qualitytest.common.Config;
import com.yj_app.qualitytest.common.NetConfig;
import com.yj_app.qualitytest.info.CompanyInfo;
import com.yj_app.qualitytest.info.TeamInfo;
import com.yj_app.qualitytest.info.WorkSpaceInfo;
import com.yj_app.qualitytest.util.PreferencesManager;

import static com.yj_app.qualitytest.base.QtApplication.getContext;

public class SccjCxModel extends BaseModelImpl implements SccjCxContract.Model {
    @Override
    public void search(WorkSpaceInfo workSpaceInfo, TeamInfo teamInfo, String time, String no, DialogCallback<String> stringDialogCallback) {
        CompanyInfo companyInfo= PreferencesManager.getInstance(getContext()).get(Config.COMPANY_INFO,CompanyInfo.class);
        get(NetConfig.SEARCH_RES,stringDialogCallback,"cjcode",workSpaceInfo.getCjcode(),"team",teamInfo.getGname(),
                "starttime",time,"endtime",no,"corp",companyInfo.getCorp());
    }
}
